package cn.chengpengper.im.platform.common.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
/*@formatter:off*/

/**
 * ____________________
 * < 神兽护体，永无bug! >
 * --------------------
 *
 * @author huchengpeng
 * @version v1.0.0
 * @date 2024/11/23 15:16
 * @description 群消息实体对象
 */

/*@formatter:on*/


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("im_group_message")
public class GroupMessage extends Model<GroupMessage> implements Serializable {
    private static final long serialVersionUID = -9137271844345414905L;

    @TableId(value = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @TableField("group_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long groupId;

    @TableField("group_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long sendId;

    @TableField("send_nick_name")
    private String sendNickName;

    @TableField("at_user_ids")
    private String atUserIds;

    @TableField("content")
    private String content;

    @TableField("type")
    private Integer type;

    @TableField("status")
    private Integer status;

    @TableField("send_time")
    private Date sendTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
